Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.0] [PHP 7.4] Call the "getName" method on the reflection type instead of the deprecated "__toString" method. #145

Closed
wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Oct 8, 2019

Hi,

First of all, thanks for creating and releasing this package!
I've tried to run this package in a PHP 7.4 environment and it seems to have a few issues with some deprecated reflection functionality, this pull request aims to fix those problems.

I've ran the tests and they all turned out green, I also did some basic manual testing and everything seemed to work again. If there's anything I missed, please let me know.

If you need me to send a PR to the upcoming 4.0 branch (master), also please let me know.

More information: https://www.php.net/manual/en/reflectiontype.tostring.php

Thanks,

Jens

@moufmouf
Copy link
Member

moufmouf commented Oct 9, 2019

Hey Jens,

Thanks a lot for this PR!
I just started another PR that simply automates Travis unit tests in PHP 7.4.

It turns out you are perfectly right.

By the way, I see unit tests are failing in PHP 7.4 for another reason (see: https://travis-ci.org/thecodingmachine/graphqlite/jobs/595492875)

We get this error message in Travis:

Doctrine\Common\Annotations\AnnotationException: [Semantical Error] The annotation "@TheCodingMachine\GraphQLite\Annotations\Field" in method TheCodingMachine\GraphQLite\Fixtures\TestType::customField() does not exist, or could not be auto-loaded.

Did you face this error message when testing? (or is it something specific to Travis only?)

Also, I would very hapilly accept a PR on the "master" branch if you have any time to work on it.

@ghost
Copy link
Author

ghost commented Oct 9, 2019

Hey @moufmouf,

Yes, i did face these errors too. It took me a while to figure out what was going wrong and to find a fix. At first i thought it had to do with my local setup. But you’ve just confirmed it isn’t.

I did find a workaround, but i’m not at home currently. I will post the workaround as soon as i get home.

Jens

@ghost
Copy link
Author

ghost commented Oct 9, 2019

Hey @moufmouf,

This is the workaround i used locally:

andyftw/ssllabs-php#1

This could eventually be incorporated in some kind of bootstrap file for PHPunit. What do you think?

@ghost ghost changed the title [PHP 7.4] Call the "getName" method on the reflection type instead of the deprecated "__toString" method. [3.0] [PHP 7.4] Call the "getName" method on the reflection type instead of the deprecated "__toString" method. Oct 9, 2019
@moufmouf
Copy link
Member

Hey Jens,

Thanks a lot!
I actually merged your code in the new 3.1 branch:

#147

and tagged a new release:

https://github.com/thecodingmachine/graphqlite/releases/tag/v3.1.1

@moufmouf moufmouf closed this Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant